package com.txzt.gaea.common.enums;

public enum ExpenseType {

    /**
     * 直接费
     */
    DIRECT("direct","直接费"),

    /**
     * 直接费
     */
    INDIRECT("indirect","直接费"),
    ;

    private final String code;

    private final String info;

    ExpenseType(String code, String info) {
        this.code = code;
        this.info = info;
    }

    public String getCode() {
        return code;
    }

    public String getInfo() {
        return info;
    }

    public static String getInfoByCode(String code){
        ExpenseType[] statuses = values();
        for (ExpenseType status:statuses){
            if (status.getCode().equals(code)) {
                return status.getInfo();
            }
        }
        return "";
    }
}
